-
Notifications
You must be signed in to change notification settings - Fork 28.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-46725][SQL] Add DAYNAME function #44758
[SPARK-46725][SQL] Add DAYNAME function #44758
Conversation
be611ad
to
fe37595
Compare
fe37595
to
11573de
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PetarVasiljevic-DB If it is still draft PR, please, add the [WIP]
tag to PR's title, and [SQL]
too.
connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/functions.scala
Show resolved
Hide resolved
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
Outdated
Show resolved
Hide resolved
...catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/DateExpressionsSuite.scala
Outdated
Show resolved
Hide resolved
b3382c2
to
22bfe06
Compare
22bfe06
to
e7611c9
Compare
sql/core/src/test/resources/sql-functions/sql-expression-schema.md
Outdated
Show resolved
Hide resolved
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
Outdated
Show resolved
Hide resolved
Co-authored-by: Maxim Gekk <max.gekk@gmail.com>
7fa5713
to
2c8f801
Compare
2c8f801
to
bbc7fcc
Compare
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/encoders/ExpressionEncoderSuite.scala
Outdated
Show resolved
Hide resolved
+1, LGTM. Merging to master. |
@PetarVasiljevic-DB Do you have an account at https://issues.apache.org/jira/browse/SPARK-46725? If so, please, leave a comment in the ticket otherwise send an request to create an account for you. |
@@ -1105,6 +1105,20 @@ setMethod("monthname", | |||
column(jc) | |||
}) | |||
|
|||
#' @details | |||
#' \code{dayname}: Extracts the three-letter abbreviated day name from a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with the function name DAYNAME, but shall we make it clearer in the doc? day-of-week name
instead of day name
. This is also what snowflake does: https://docs.snowflake.com/en/sql-reference/functions/dayname
What changes were proposed in this pull request?
Added DAYNAME function that returns three letter abbreviation day name for the specified date to:
Why are the changes needed?
For parity with Snowflake
Does this PR introduce any user-facing change?
Yes, since new function DAYNAME is added
How was this patch tested?
Tested on new unit tests
Was this patch authored or co-authored using generative AI tooling?
No